#ifndef CHI_SQUARE_H
#define CHI_SQUARE_H

extern "C" {
#include <gsl/gsl_cdf.h>
}

double chiSquare(double x, double nu) {
  return gsl_cdf_chisq_P(x, nu);
}

double invChiSquare(double x, double nu) {
  return gsl_cdf_chisq_Pinv(x, nu);
}

#endif
